package com.coocaa.optimizer.movie.cleaner.config;

import android.content.Context;

import com.coocaa.optimizer.OptimizerApplication;

/**
 * Created by lu on 17-3-29.
 */

public class CleanerConfigImpl implements CleanerConfig {
    private static final String CONFIG_AUTOCLEAN = "movie.cleaner.autoclean";

    private OptimizerApplication.Config config = null;

    CleanerConfigImpl(Context context) {
        config = OptimizerApplication.ConfigFactory.factory.create(context);
    }

    @Override
    public void setAutoClean(boolean b) {
        config.put(CONFIG_AUTOCLEAN, String.valueOf(b));
    }

    @Override
    public boolean getAutoClean() {
        return Boolean.parseBoolean(config.get(CONFIG_AUTOCLEAN));
    }
}

